# Maintainer: Alexey Pavlov <alexpux@gmail.com>

pkgname=mintty
pkgver=2.2.1
pkgrel=1
epoch=1
pkgdesc="Terminal emulator with native Windows look and feel"
arch=('i686' 'x86_64')
license=('GPL3')
groups=('base')
depends=('sh')
url="https://mintty.github.io"
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/mintty/mintty/archive/${pkgver}.tar.gz)
sha1sums=('67ea96f65d7726b6dc5ac647e5a667026ecc6fa8')

prepare() {
  cd "${srcdir}/${pkgname}-${pkgver}"
}

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  mkdir -p ${pkgdir}/usr/{bin,share}
  mkdir -p ${pkgdir}/usr/share/man/man1
  mkdir -p ${pkgdir}/usr/share/licenses/${pkgname}


  install -m755 bin/mintty.exe ${pkgdir}/usr/bin/mintty.exe
  install -m644 docs/mintty.1 ${pkgdir}/usr/share/man/man1/mintty.1

  install -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/
  install -m644 LICENSE.Oxygen ${pkgdir}/usr/share/licenses/${pkgname}/
  install -m644 LICENSE.PuTTY ${pkgdir}/usr/share/licenses/${pkgname}/
}
